import layout from '@/components/layout/index'

const routes = [
        {
            path: '/login',
            name: 'login',
            meta: {
                title: "登录"
            },
            component: () => import('@/views/login/login.vue')
        },
        {
            path: '/register',
            name: 'register',
            meta: {
                title: "注册"
            },
            component: resolve => require(['@/views/login/register.vue'], resolve),
        },

        {
            path: '/sysuser',
            name: 'SysUser',
            component: layout,
            meta: {
                title: "权限管理"
            },
            redirect: '/sysuser/role',
            children: [
                {
                    path: 'role',
                    name: 'RoleList',
                    meta: {
                        title: "角色管理"
                    },
                    component: () => import('@/views/system/role-list.vue')
                },
                {
                    path: 'admin',
                    name: 'AdminList',
                    meta: {
                        title: "管理员列表"
                    },
                    component: () => import('@/views/system/sys-user-list.vue')
                },
                {
                    path: 'menu',
                    name: 'MenuList',
                    meta: {
                        title: "菜单管理"
                    },
                    component: () => import('@/views/system/menu-list.vue')
                }, {
                    path: 'dept',
                    name: 'DeptList',
                    meta: {
                        title: "部门管理"
                    },
                    component: () => import('@/views/system/dept-list.vue')
                }
            ]
        },
        {
            path: '/systemmana',
            name: 'systemmana',
            component: layout,
            redirect: '/system-config/globalconfig',
            meta: {
                title: "系统管理"
            },
            children: [
                {
                    path: '/systemmana/im',
                    name: 'Im',
                    meta: {
                        title: '即时通讯'
                    },
                    component: () => import('@/views/im/im.vue')
                },
                {
                    path: '/systemmana/operateLog',
                    name: 'operateLog',
                    meta: {
                        title: '操作日志'
                    },
                    component: () => import('@/views/system-config/operate-log.vue')
                },
                {
                    path: '/systemmana/cacheMonitor',
                    name: 'operateLog',
                    meta: {
                        title: '缓存监控'
                    },
                    component: () => import('@/views/system-config/cache-monitor.vue')
                },
                {
                    path: '/systemmana/serverMonitor',
                    name: 'operateLog',
                    meta: {
                        title: '服务监控'
                    },
                    component: () => import('@/views/system-config/server-monitor.vue')
                },
                {
                    path: '/systemmana/genCode',
                    name: 'genCode',
                    meta: {
                        title: '代码生成'
                    },
                    component: () => import('@/views/system-config/gen-code.vue')
                },
                {
                    path: '/systemmana/sysNotice',
                    name: 'sysNotice',
                    meta: {
                        title: '通知公告'
                    },
                    component: () => import('@/views/system-config/system-notice.vue')
                }
            ]

        },
        {
            path: '/home',
            name: 'Home',
            component: layout,
            redirect: '/home',
            children: [
                {
                    path: '/home',
                    name: 'Home',
                    meta: {
                        title: "首页"
                    },
                    component: () => import('@/views/home/home.vue'),
                }
            ]
        }
    ]
;

export default routes;
